<mat-tree [dataSource]="dataSource" [treeControl]="treeControl">
  <!-- This is the tree node template for leaf nodes -->
  <mat-tree-node *matTreeNodeDef="let node" matTreeNodePadding
                 class="example-tree-node"
                 tabindex="0">
    <!-- use a disabled button to provide padding for tree leaf -->
    <button matIconButton disabled></button>
    {{node.name}}
  </mat-tree-node>
  <!-- This is the tree node template for expandable nodes -->
  <mat-tree-node *matTreeNodeDef="let node; when: hasChild" matTreeNodePadding
                 isExpandable
                 [isExpanded]="true"
                 class="example-tree-node"
                 tabindex="0">
    {{node.name}}
  </mat-tree-node>
</mat-tree>
